<include file="Index:header" />
<style type="text/css">
.cla1{ font-weight:600; font-size:14px;}
.cla2{ font-weight:500; font-size:12px; margin-left:5px;}
.cla3{ font-weight:500; font-size:10px; margin-left:10px;}
</style>
<!-- Content Header (Page header) -->
    <section class="content-header">
      <h1> 栏目管理 </h1>
      <ol class="breadcrumb">
        <li><a href="__APP__/TIFAWEB_DSWJCMS.html" class="goindex"><i class="fa fa-dashboard"></i> 首页</a></li>
        <li> 文章管理</li>
        <li class="active">栏目管理</li>
      </ol>
    </section>
<!--主体-->
    <!-- Main content -->
  <section class="content">
    <div class="box">
    <div class="box-header">
      <div class="box-tools">
        <a href="__APP__/TIFAWEB_DSWJCMS/Site/addSite.html">添加新栏目</a>
      </div>
    </div>
    <div class="box-body">
    <table class="table table-bordered table-hover"  id="example1">
    	<thead>
          <tr>
            <th>栏目ID</th>
            <th>栏目名称</th>
            <th>页面类型</th>
            <th>状态</th>
            <th>排序</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
         <volist name="site" id="vo">
          <tr>
            <td>{$vo.id}</td>
            <td>
            <a href="__APP__/TIFAWEB_DSWJCMS/Site/editSite/id/{$vo.id}.html">
              <span class="cla{$vo.order}">
              <if condition="$vo['order'] eq 1 ">
              {$vo.title}
               <elseif condition="$vo['order'] eq 2 " />
                ├ {$vo.title}
                <elseif condition="$vo['order'] eq 3 " /> 
                │├ {$vo.title}
                <else/>
                错误
                </if>
              </span>
            </a>
            </td>
            <td>
             <if condition="$vo['type'] eq 1 ">
              封面
              <elseif condition="$vo['type'] eq 2 " />
              列表页
              <else />
              内容页
              </if>
            </td>
            <td>{$vo['status']?'显示':'隐藏'}</td>
            <td>{$vo.orde}</td>
            <td>
               <a href="__APP__/TIFAWEB_DSWJCMS/Site/articleList/id/{$vo.id}.html" class="fa fa-map-o text-light-blue" title="查看文章"></a>&nbsp;&nbsp;
                <a href="__APP__/TIFAWEB_DSWJCMS/Site/editSite/id/{$vo.id}.html" class="fa fa-pencil text-light-blue" title="编辑栏目"></a>&nbsp;&nbsp;
              <if condition="$vo['type'] eq 1 ">
                <a href="__ROOT__{$vo.link}" target="_blank" class="fa fa-eye text-light-blue" title="预览栏目"></a>&nbsp;&nbsp;
              <elseif condition="$vo['type'] eq 2 " />
                <a href="__ROOT__/Site/listTpl/id/{$vo.id}" target="_blank" class="fa fa-eye text-light-blue" title="预览栏目"></a>&nbsp;&nbsp;
              <else />
                <a href="__ROOT__/Site/page/id/{$vo.id}" target="_blank" class="fa fa-eye text-light-blue" title="预览栏目"></a>&nbsp;&nbsp;
              </if>
            <if condition="intval($vo['order']) lt 3 && $vo['type'] eq 1 ">
               <a href="__APP__/TIFAWEB_DSWJCMS/Site/addSite/pid/{$vo.id}" class="fa fa-clone text-light-blue" title="添加子栏目"></a>&nbsp;&nbsp;
             </if>
               <a href="#" class="fa fa-trash text-red" title="删除栏目" onclick="if(confirm('是否要删除？'))window.location.href='__APP__/TIFAWEB_DSWJCMS/Site/delSite/id/{$vo.id}'"></a>
               
            </td>
          </tr>
        </volist>
        </tbody>
     </table>
    </div>
    </div>
  </section>
<include file="Index:footer" />
<script>
$(function () {
    $('#example1').DataTable({
		language: {  
		  "sProcessing": "处理中...",  
		  "sLengthMenu": "显示 _MENU_ 项结果",  
		  "sZeroRecords": "没有匹配结果",  
		  "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",  
		  "sInfoEmpty": "显示第 0 至 0 项结果，共 0 项",  
		  "sInfoFiltered": "(由 _MAX_ 项结果过滤)",  
		  "sInfoPostFix": "",  
		  "sSearch": "搜索:",  
		  "sUrl": "",  
		  "sEmptyTable": "表中数据为空",  
		  "sLoadingRecords": "载入中...",  
		  "sInfoThousands": ",",  
		  "oPaginate": {  
			  "sFirst": "首页",  
			  "sPrevious": "上页",  
			  "sNext": "下页",  
			  "sLast": "末页"  
		  },  
		  "oAria": {  
			  "sSortAscending": ": 以升序排列此列",  
			  "sSortDescending": ": 以降序排列此列"  
		  }  
	  }  
	})
})
</script>